﻿define([],
function () {
    'use strict';

    // Dictionary to store the count of generated ids per type
    var ids = {};

    return {

        // Generates an id based on a type
        generateId: function (type) {

            if (!ids[type]) {
                ids[type] = 0;
            }

            return type + (++ids[type]);
        }

    };
});